home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Mem / c / MoveAnchor < prev    next >
Text File  |  1995-06-11  |  1KB  |  33 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Mem.MoveAnchor.c
  12.     Author:  Copyright © 1993 Jason Williams
  13.     Version: 1.00 (15 Jul 1993)
  14.     Purpose: Moving chunk anchors into different storage locations
  15. */
  16.  
  17. #include "MemDefs.h"
  18.  
  19.  
  20. extern void Mem_MoveAnchor(mem_anchor *from, mem_anchor *to)
  21. {
  22.   mem_header *chunk;
  23.  
  24.   *to = NULL;
  25.   if(Mem__FindChunk(from, &chunk))
  26.   {
  27.     *from = NULL;                                     /* Kill the old anchor */
  28.  
  29.     *to = (void *)((int)chunk + sizeof(mem_header));
  30.     chunk->handle = to;                               /* Link in new anchor  */
  31.   }
  32. }
  33.